package com.newly.center.business.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.newly.common.base.entity.R;
import com.newly.common.base.entity.auth.ICurrentTenant;
import com.newly.common.base.entity.business.Dto.CarDto;
import com.newly.common.base.entity.business.Dto.CarListDto;
import com.newly.common.base.entity.business.Po.Vehicle;
import com.newly.common.base.entity.business.Vo.DetailsVo;
import com.newly.common.base.entity.business.Vo.ExcelVehicle;
import com.newly.common.core.utils.PageUtil;

import java.util.List;

/**
 * @anthor sbq
 * @date 2021/10/26 14:22
 */
public interface VehicleService extends IService<Vehicle> {

    /**
     * 分页查询车辆列表
     * @param carListDto
     * @return
     */
    PageUtil getPage(ICurrentTenant currentTenant, CarListDto carListDto);

    /**
     * 根据车牌号获取车辆详情
     * @param vehicleNumber
     * @return
     */
    DetailsVo<Vehicle> getCarDetails(String vehicleNumber,Integer offset);

    /**
     * 编辑
     * @param carDto
     * @return
     */
    void edit(CarDto carDto);


    /**
     * 保存
     * @param carDto
     * @return
     */
    void save(CarDto carDto, ICurrentTenant currentTenant);

    /**
     * 批量保存
     * @param list
     * @param currentTenant
     * @return
     */
    boolean batchSave(List<ExcelVehicle> list,ICurrentTenant currentTenant);

    /**
     * 批量删除
     * @param ids
     * @return
     */
    R delete(Long[] ids);

    /**
     * 查重复车牌号
     * @param carNumber
     * @return
     */
    boolean repeat(String carNumber);

    /**
     * 设置黑名单
     * @param carNumber
     * @return
     */
    boolean setBlackName(String id ,String carNumber,Boolean isBlackName);
}
